package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * 权限实体
 */
@TableName("t_grade")
public class GradeBean {
    /**
     * 权限id
     */
    @TableId(value = "pk_gradeId",type = IdType.AUTO)
    private Integer id;
    /**
     * 权限名称
     */
    @TableField("g_grade")
    private String grade;
    /**
     * 角色集合
     */
    @TableField(exist = false)
    private List<RoleBean> roleList;

    @Override
    public String toString() {
        return "GradeBean{" +
                "id=" + id +
                ", grade='" + grade + '\'' +
                ", roleList=" + roleList +
                '}';
    }

    public GradeBean() {
    }

    public GradeBean(String grade) {
        this.grade = grade;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public List<RoleBean> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<RoleBean> roleList) {
        this.roleList = roleList;
    }
}
